Issues with the tensorflow api detection

by: Arabinda, 6 years ago


Hi everybody,

When I try to run the tensorflow api for object detection after following all the steps in the tutorial, I am getting the following error:

2018-01-15 17:27:40.350290: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Shape mismatch in tuple component 14. Expected [1,?,?,3], got [1,6,243,416,3]
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Shape mismatch in tuple component 14. Expected [1,?,?,3], got [1,6,243,416,3]
[[Node: batch/padding_fifo_queue_enqueue = QueueEnqueueV2[Tcomponents=[DT_STRING, DT_INT32, DT_FLOAT, DT_INT32, DT_FLOAT, DT_INT32, DT_INT64, DT_INT32, DT_INT64, DT_INT32, DT_INT64, DT_INT32, DT_BOOL, DT_INT32, DT_FLOAT, DT_INT32, DT_STRING, DT_INT32, DT_STRING, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](batch/padding_fifo_queue, Reshape_2, Shape_3, SparseToDense, Shape_5, Merge_1, Shape_4, Merge_2, Shape_9, SparseToDense_2, Shape_7, SparseToDense_3, Shape_8, Cast, Shape_6, ExpandDims_5, Shape, Reshape_5, Shape_3, Reshape_6, Shape_3)]]
INFO:tensorflow:global step 2: loss = 12.8515 (1.527 sec/step)
INFO:tensorflow:Finished training! Saving model to disk.
Traceback (most recent call last):
  File "train.py", line 163, in <module>
    tf.app.run()
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "train.py", line 159, in main
    worker_job_name, is_chief, FLAGS.train_dir)
  File "/home/paperspace/Desktop/models1/research/object_detection/trainer.py", line 332, in train
    saver=saver)
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/slim/python/slim/learning.py", line 775, in train
    sv.stop(threads, close_summary_writer=True)
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/supervisor.py", line 792, in stop
    stop_grace_period_secs=self._stop_grace_secs)
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/coordinator.py", line 389, in join
    six.reraise(*self._exc_info_to_raise)
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/six.py", line 686, in reraise
    raise value
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/queue_runner_impl.py", line 238, in _run
    enqueue_callable()
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1231, in _single_operation_run
    target_list_as_strings, status, None)
  File "/home/paperspace/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape mismatch in tuple component 14. Expected [1,?,?,3], got [1,6,243,416,3]
[[Node: batch/padding_fifo_queue_enqueue = QueueEnqueueV2[Tcomponents=[DT_STRING, DT_INT32, DT_FLOAT, DT_INT32, DT_FLOAT, DT_INT32, DT_INT64, DT_INT32, DT_INT64, DT_INT32, DT_INT64, DT_INT32, DT_BOOL, DT_INT32, DT_FLOAT, DT_INT32, DT_STRING, DT_INT32, DT_STRING, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](batch/padding_fifo_queue, Reshape_2, Shape_3, SparseToDense, Shape_5, Merge_1, Shape_4, Merge_2, Shape_9, SparseToDense_2, Shape_7, SparseToDense_3, Shape_8, Cast, Shape_6, ExpandDims_5, Shape, Reshape_5, Shape_3, Reshape_6, Shape_3)]]




Can somebody please help me  in this regard. I have been trying very hard for the past 2 days but have been unable to solve this problem. Please help?



You must be logged in to post. Please login or register an account.



hi,
    I encounter the same problem, so I want to know how you solve the problem
                                                                                                             thank you

-guobaoyan 4 years ago

You must be logged in to post. Please login or register an account.